<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>MCUXpresso SDK API Reference Manual: SAI DMA Driver</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="fs_logo.gif"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">MCUXpresso SDK API Reference Manual
   &#160;<span id="projectnumber">Rev. 0</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>API&#160;Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__sai__dma.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a>  </div>
  <div class="headertitle">
<div class="title">SAI DMA Driver<div class="ingroups"><a class="el" href="group__sai.html">SAI: Serial Audio Interface</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:struct__sai__dma__handle"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#struct__sai__dma__handle">sai_dma_handle_t</a></td></tr>
<tr class="memdesc:struct__sai__dma__handle"><td class="mdescLeft">&#160;</td><td class="mdescRight">SAI DMA transfer handle, users should not touch the content of the handle.  <a href="group__sai__dma.html#struct__sai__dma__handle">More...</a><br/></td></tr>
<tr class="separator:struct__sai__dma__handle"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gafe94065dd1c0e93fdbc9c8602b6754d4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gafe94065dd1c0e93fdbc9c8602b6754d4"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#gafe94065dd1c0e93fdbc9c8602b6754d4">sai_dma_callback_t</a> )(I2S_Type *base, sai_dma_handle_t *handle, status_t status, void *userData)</td></tr>
<tr class="memdesc:gafe94065dd1c0e93fdbc9c8602b6754d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Define SAI DMA callback. <br/></td></tr>
<tr class="separator:gafe94065dd1c0e93fdbc9c8602b6754d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
DMA Transactional</h2></td></tr>
<tr class="memitem:ga45cf3cd4ef66df0390955bd973c1c08c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#ga45cf3cd4ef66df0390955bd973c1c08c">SAI_TransferTxCreateHandleDMA</a> (I2S_Type *base, sai_dma_handle_t *handle, <a class="el" href="group__sai__dma.html#gafe94065dd1c0e93fdbc9c8602b6754d4">sai_dma_callback_t</a> callback, void *userData, dma_handle_t *dmaHandle)</td></tr>
<tr class="memdesc:ga45cf3cd4ef66df0390955bd973c1c08c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the SAI master DMA handle.  <a href="#ga45cf3cd4ef66df0390955bd973c1c08c">More...</a><br/></td></tr>
<tr class="separator:ga45cf3cd4ef66df0390955bd973c1c08c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3c6e04c0f580433a27bdd80d8d3d204b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#ga3c6e04c0f580433a27bdd80d8d3d204b">SAI_TransferRxCreateHandleDMA</a> (I2S_Type *base, sai_dma_handle_t *handle, <a class="el" href="group__sai__dma.html#gafe94065dd1c0e93fdbc9c8602b6754d4">sai_dma_callback_t</a> callback, void *userData, dma_handle_t *dmaHandle)</td></tr>
<tr class="memdesc:ga3c6e04c0f580433a27bdd80d8d3d204b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the SAI slave DMA handle.  <a href="#ga3c6e04c0f580433a27bdd80d8d3d204b">More...</a><br/></td></tr>
<tr class="separator:ga3c6e04c0f580433a27bdd80d8d3d204b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga407634e2c9a7bad5ff0a1edf21c5dcc7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#ga407634e2c9a7bad5ff0a1edf21c5dcc7">SAI_TransferTxSetFormatDMA</a> (I2S_Type *base, sai_dma_handle_t *handle, <a class="el" href="group__sai.html#structsai__transfer__format__t">sai_transfer_format_t</a> *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz)</td></tr>
<tr class="memdesc:ga407634e2c9a7bad5ff0a1edf21c5dcc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the SAI Tx audio format.  <a href="#ga407634e2c9a7bad5ff0a1edf21c5dcc7">More...</a><br/></td></tr>
<tr class="separator:ga407634e2c9a7bad5ff0a1edf21c5dcc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9904eefc346fbdb736d64ebfdf5a7772"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#ga9904eefc346fbdb736d64ebfdf5a7772">SAI_TransferRxSetFormatDMA</a> (I2S_Type *base, sai_dma_handle_t *handle, <a class="el" href="group__sai.html#structsai__transfer__format__t">sai_transfer_format_t</a> *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz)</td></tr>
<tr class="memdesc:ga9904eefc346fbdb736d64ebfdf5a7772"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the SAI Rx audio format.  <a href="#ga9904eefc346fbdb736d64ebfdf5a7772">More...</a><br/></td></tr>
<tr class="separator:ga9904eefc346fbdb736d64ebfdf5a7772"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4674905418214220bf6f140db196d0a2"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#ga4674905418214220bf6f140db196d0a2">SAI_TransferSendDMA</a> (I2S_Type *base, sai_dma_handle_t *handle, <a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a> *xfer)</td></tr>
<tr class="memdesc:ga4674905418214220bf6f140db196d0a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a non-blocking SAI transfer using DMA.  <a href="#ga4674905418214220bf6f140db196d0a2">More...</a><br/></td></tr>
<tr class="separator:ga4674905418214220bf6f140db196d0a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga308a6c96f8a7e9008ae212b0502bb436"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#ga308a6c96f8a7e9008ae212b0502bb436">SAI_TransferReceiveDMA</a> (I2S_Type *base, sai_dma_handle_t *handle, <a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a> *xfer)</td></tr>
<tr class="memdesc:ga308a6c96f8a7e9008ae212b0502bb436"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a non-blocking SAI transfer using DMA.  <a href="#ga308a6c96f8a7e9008ae212b0502bb436">More...</a><br/></td></tr>
<tr class="separator:ga308a6c96f8a7e9008ae212b0502bb436"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabb89542205c5b3be33f93ea43e071492"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#gabb89542205c5b3be33f93ea43e071492">SAI_TransferAbortSendDMA</a> (I2S_Type *base, sai_dma_handle_t *handle)</td></tr>
<tr class="memdesc:gabb89542205c5b3be33f93ea43e071492"><td class="mdescLeft">&#160;</td><td class="mdescRight">Aborts a SAI transfer using DMA.  <a href="#gabb89542205c5b3be33f93ea43e071492">More...</a><br/></td></tr>
<tr class="separator:gabb89542205c5b3be33f93ea43e071492"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf6700092ebb0b66f74a0cd6c5e4a3415"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#gaf6700092ebb0b66f74a0cd6c5e4a3415">SAI_TransferAbortReceiveDMA</a> (I2S_Type *base, sai_dma_handle_t *handle)</td></tr>
<tr class="memdesc:gaf6700092ebb0b66f74a0cd6c5e4a3415"><td class="mdescLeft">&#160;</td><td class="mdescRight">Aborts a SAI transfer using DMA.  <a href="#gaf6700092ebb0b66f74a0cd6c5e4a3415">More...</a><br/></td></tr>
<tr class="separator:gaf6700092ebb0b66f74a0cd6c5e4a3415"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafbf9cc39de3edf94f9352ab0a92b7f7f"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#gafbf9cc39de3edf94f9352ab0a92b7f7f">SAI_TransferGetSendCountDMA</a> (I2S_Type *base, sai_dma_handle_t *handle, size_t *count)</td></tr>
<tr class="memdesc:gafbf9cc39de3edf94f9352ab0a92b7f7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets byte count sent by SAI.  <a href="#gafbf9cc39de3edf94f9352ab0a92b7f7f">More...</a><br/></td></tr>
<tr class="separator:gafbf9cc39de3edf94f9352ab0a92b7f7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafe61ce4db526e6a620678bcb0e8e3cd8"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#gafe61ce4db526e6a620678bcb0e8e3cd8">SAI_TransferGetReceiveCountDMA</a> (I2S_Type *base, sai_dma_handle_t *handle, size_t *count)</td></tr>
<tr class="memdesc:gafe61ce4db526e6a620678bcb0e8e3cd8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets byte count received by SAI.  <a href="#gafe61ce4db526e6a620678bcb0e8e3cd8">More...</a><br/></td></tr>
<tr class="separator:gafe61ce4db526e6a620678bcb0e8e3cd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="struct__sai__dma__handle" id="struct__sai__dma__handle"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct _sai_dma_handle</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"></div><table class="memberdecls">
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:a2ff11bc57b473667a1630839d44969b5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2ff11bc57b473667a1630839d44969b5"></a>
dma_handle_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#a2ff11bc57b473667a1630839d44969b5">dmaHandle</a></td></tr>
<tr class="memdesc:a2ff11bc57b473667a1630839d44969b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">DMA handler for SAI send. <br/></td></tr>
<tr class="separator:a2ff11bc57b473667a1630839d44969b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49888eef7d2f2d4af5bbd45f04dc737c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a49888eef7d2f2d4af5bbd45f04dc737c"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#a49888eef7d2f2d4af5bbd45f04dc737c">bytesPerFrame</a></td></tr>
<tr class="memdesc:a49888eef7d2f2d4af5bbd45f04dc737c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bytes in a frame. <br/></td></tr>
<tr class="separator:a49888eef7d2f2d4af5bbd45f04dc737c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a851906e81d7a1b0a24b84ef9167b1197"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a851906e81d7a1b0a24b84ef9167b1197"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#a851906e81d7a1b0a24b84ef9167b1197">channel</a></td></tr>
<tr class="memdesc:a851906e81d7a1b0a24b84ef9167b1197"><td class="mdescLeft">&#160;</td><td class="mdescRight">Which Data channel SAI use. <br/></td></tr>
<tr class="separator:a851906e81d7a1b0a24b84ef9167b1197"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7927939cda90ddb17f4be0bbb64ccaf7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7927939cda90ddb17f4be0bbb64ccaf7"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#a7927939cda90ddb17f4be0bbb64ccaf7">state</a></td></tr>
<tr class="memdesc:a7927939cda90ddb17f4be0bbb64ccaf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">SAI DMA transfer internal state. <br/></td></tr>
<tr class="separator:a7927939cda90ddb17f4be0bbb64ccaf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0747447132598a08f14dc91974075a5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0747447132598a08f14dc91974075a5"></a>
<a class="el" href="group__sai__dma.html#gafe94065dd1c0e93fdbc9c8602b6754d4">sai_dma_callback_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#af0747447132598a08f14dc91974075a5">callback</a></td></tr>
<tr class="memdesc:af0747447132598a08f14dc91974075a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback for users while transfer finish or error occured. <br/></td></tr>
<tr class="separator:af0747447132598a08f14dc91974075a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0d2787083adec493003650b7dfe13eb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab0d2787083adec493003650b7dfe13eb"></a>
void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#ab0d2787083adec493003650b7dfe13eb">userData</a></td></tr>
<tr class="memdesc:ab0d2787083adec493003650b7dfe13eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">User callback parameter. <br/></td></tr>
<tr class="separator:ab0d2787083adec493003650b7dfe13eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bf0dc46cc9e13a5fa76687b107fcb66"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#a6bf0dc46cc9e13a5fa76687b107fcb66">saiQueue</a> [<a class="el" href="group__sai.html#ga580bf35fe1f08d7bb054bee399f8b085">SAI_XFER_QUEUE_SIZE</a>]</td></tr>
<tr class="memdesc:a6bf0dc46cc9e13a5fa76687b107fcb66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transfer queue storing queued transfer.  <a href="#a6bf0dc46cc9e13a5fa76687b107fcb66">More...</a><br/></td></tr>
<tr class="separator:a6bf0dc46cc9e13a5fa76687b107fcb66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840fe1ff10b5936b370d956387230b9c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a840fe1ff10b5936b370d956387230b9c"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#a840fe1ff10b5936b370d956387230b9c">transferSize</a> [<a class="el" href="group__sai.html#ga580bf35fe1f08d7bb054bee399f8b085">SAI_XFER_QUEUE_SIZE</a>]</td></tr>
<tr class="memdesc:a840fe1ff10b5936b370d956387230b9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data bytes need to transfer. <br/></td></tr>
<tr class="separator:a840fe1ff10b5936b370d956387230b9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdbfd9705925fa6e816b952ca3d64877"><td class="memItemLeft" align="right" valign="top">volatile uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#acdbfd9705925fa6e816b952ca3d64877">queueUser</a></td></tr>
<tr class="memdesc:acdbfd9705925fa6e816b952ca3d64877"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index for user to queue transfer.  <a href="#acdbfd9705925fa6e816b952ca3d64877">More...</a><br/></td></tr>
<tr class="separator:acdbfd9705925fa6e816b952ca3d64877"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa361c6a599c94b61154646f982261026"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa361c6a599c94b61154646f982261026"></a>
volatile uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__dma.html#aa361c6a599c94b61154646f982261026">queueDriver</a></td></tr>
<tr class="memdesc:aa361c6a599c94b61154646f982261026"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index for driver to get the transfer data and size. <br/></td></tr>
<tr class="separator:aa361c6a599c94b61154646f982261026"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h4 class="groupheader">Field Documentation</h4>
<a class="anchor" id="a6bf0dc46cc9e13a5fa76687b107fcb66"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a> sai_dma_handle_t::saiQueue[<a class="el" href="group__sai.html#ga580bf35fe1f08d7bb054bee399f8b085">SAI_XFER_QUEUE_SIZE</a>]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="acdbfd9705925fa6e816b952ca3d64877"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint8_t sai_dma_handle_t::queueUser</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga45cf3cd4ef66df0390955bd973c1c08c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferTxCreateHandleDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_dma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai__dma.html#gafe94065dd1c0e93fdbc9c8602b6754d4">sai_dma_callback_t</a>&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">dma_handle_t *&#160;</td>
          <td class="paramname"><em>dmaHandle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function initializes the SAI master DMA handle, which can be used for other SAI master transactional APIs. Usually, for a specified SAI instance, call this API once to get the initialized handle.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI DMA handle pointer. </td></tr>
    <tr><td class="paramname">base</td><td>SAI peripheral base address. </td></tr>
    <tr><td class="paramname">callback</td><td>Pointer to user callback function. </td></tr>
    <tr><td class="paramname">userData</td><td>User parameter passed to the callback function. </td></tr>
    <tr><td class="paramname">dmaHandle</td><td>DMA handle pointer, this handle shall be static allocated by users. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga3c6e04c0f580433a27bdd80d8d3d204b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferRxCreateHandleDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_dma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai__dma.html#gafe94065dd1c0e93fdbc9c8602b6754d4">sai_dma_callback_t</a>&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">dma_handle_t *&#160;</td>
          <td class="paramname"><em>dmaHandle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function initializes the SAI slave DMA handle, which can be used for other SAI master transactional APIs. Usually, for a specified SAI instance, call this API once to get the initialized handle.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI DMA handle pointer. </td></tr>
    <tr><td class="paramname">base</td><td>SAI peripheral base address. </td></tr>
    <tr><td class="paramname">callback</td><td>Pointer to user callback function. </td></tr>
    <tr><td class="paramname">userData</td><td>User parameter passed to the callback function. </td></tr>
    <tr><td class="paramname">dmaHandle</td><td>DMA handle pointer, this handle shall be static allocated by users. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga407634e2c9a7bad5ff0a1edf21c5dcc7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferTxSetFormatDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_dma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai.html#structsai__transfer__format__t">sai_transfer_format_t</a> *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mclkSourceClockHz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bclkSourceClockHz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The audio format can be changed at run-time. This function configures the sample rate and audio data format to be transferred. This function also sets the eDMA parameter according to the format.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI DMA handle pointer. </td></tr>
    <tr><td class="paramname">format</td><td>Pointer to SAI audio data format structure. </td></tr>
    <tr><td class="paramname">mclkSourceClockHz</td><td>SAI master clock source frequency in Hz. </td></tr>
    <tr><td class="paramname">bclkSourceClockHz</td><td>SAI bit clock source frequency in Hz. If bit clock source is master. clock, this value should equals to masterClockHz in format. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Audio format set successfully. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>The input arguments is invalid. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga9904eefc346fbdb736d64ebfdf5a7772"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferRxSetFormatDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_dma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai.html#structsai__transfer__format__t">sai_transfer_format_t</a> *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mclkSourceClockHz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bclkSourceClockHz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The audio format can be changed at run-time. This function configures the sample rate and audio data format to be transferred. This function also sets eDMA parameter according to format.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI DMA handle pointer. </td></tr>
    <tr><td class="paramname">format</td><td>Pointer to SAI audio data format structure. </td></tr>
    <tr><td class="paramname">mclkSourceClockHz</td><td>SAI master clock source frequency in Hz. </td></tr>
    <tr><td class="paramname">bclkSourceClockHz</td><td>SAI bit clock source frequency in Hz. If bit clock source is master. clock, this value should equals to masterClockHz in format. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Audio format set successfully. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>The input arguments is invalid. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga4674905418214220bf6f140db196d0a2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t SAI_TransferSendDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_dma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a> *&#160;</td>
          <td class="paramname"><em>xfer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section note"><dt>Note</dt><dd>This interface returns immediately after the transfer initiates. Call the SAI_GetTransferStatus to poll the transfer status to check whether the SAI transfer finished.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI DMA handle pointer. </td></tr>
    <tr><td class="paramname">xfer</td><td>Pointer to DMA transfer structure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Successfully start the data receive. </td></tr>
    <tr><td class="paramname">kStatus_SAI_TxBusy</td><td>Previous receive still not finished. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>The input parameter is invalid. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga308a6c96f8a7e9008ae212b0502bb436"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t SAI_TransferReceiveDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_dma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a> *&#160;</td>
          <td class="paramname"><em>xfer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section note"><dt>Note</dt><dd>This interface returns immediately after transfer initiates. Call SAI_GetTransferStatus to poll the transfer status to check whether the SAI transfer is finished.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer </td></tr>
    <tr><td class="paramname">handle</td><td>SAI DMA handle pointer. </td></tr>
    <tr><td class="paramname">xfer</td><td>Pointer to DMA transfer structure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Successfully start the data receive. </td></tr>
    <tr><td class="paramname">kStatus_SAI_RxBusy</td><td>Previous receive still not finished. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>The input parameter is invalid. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gabb89542205c5b3be33f93ea43e071492"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferAbortSendDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_dma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI DMA handle pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf6700092ebb0b66f74a0cd6c5e4a3415"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferAbortReceiveDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_dma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI DMA handle pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gafbf9cc39de3edf94f9352ab0a92b7f7f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t SAI_TransferGetSendCountDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_dma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI DMA handle pointer. </td></tr>
    <tr><td class="paramname">count</td><td>Bytes count sent by SAI. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Succeed get the transfer count. </td></tr>
    <tr><td class="paramname">kStatus_NoTransferInProgress</td><td>There is not a non-blocking transaction currently in progress. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gafe61ce4db526e6a620678bcb0e8e3cd8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t SAI_TransferGetReceiveCountDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_dma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI DMA handle pointer. </td></tr>
    <tr><td class="paramname">count</td><td>Bytes count received by SAI. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Succeed get the transfer count. </td></tr>
    <tr><td class="paramname">kStatus_NoTransferInProgress</td><td>There is not a non-blocking transaction currently in progress. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">&copy; 2016 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
